/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.ismaila.designPatterns.structural.bridge;

/**
 *
 * @author Chelsea
 */
public abstract class Vehicle {
Engine engine;
int weightInKilos;
public abstract String drive();
public void setEngine(Engine engine){
this.engine=engine;
}
public String reportOnSpeed(int horsepower){
int ratio=weightInKilos/horsepower;
if(ratio<3){
return "Thevehicleisgoingatafastspeed.";
}else if((ratio>=3)&&(ratio<8)){
return "Thevehicleisgoinganaveragespeed.";
}else {
return "Thevehicleisgoingataslowspeed.";
}
}
    
}
